@font-face {
  font-family: "caslon";
  src: url("/twoslash/CaslonOS-Regular.otf") format("woff2");
}

@font-face {
  font-family: "euclid";
  src: url("/twoslash/EuclidInitialsnormal.woff2") format("woff2");
}

@font-face {
  font-family: "caslon";
  src: url("/CaslonOS-Regular.otf") format("woff2");
}

@font-face {
  font-family: "euclid";
  src: url("/EuclidInitialsnormal.woff2") format("woff2");
}

html,
body {
  padding: 0;
  margin: 0;
  background-color: #fcf3d9;
  font-family: "caslon", "Times New Roman", Times, serif;
  text-align: justify;
}

a {
  color: inherit;
}

* {
  box-sizing: border-box;
}

.eu {
  font-family: "euclid";
  font-size: 20rem;
  display: inline-block;
  height: 5rem;
  margin-left: -0.4rem;
  margin-top: -4rem;
}

p {
  font-size: 1.3rem;
  line-height: 2rem;
}

h1 {
  font-size: 3.8rem;
  margin-bottom: 0;
}

h2 {
  font-size: 3rem;
  margin-top: 1rem;
  margin-bottom: 6rem;
}

h2 > a {
  opacity: 0.3;
  text-decoration: none;
}
h2 > a:hover {
  opacity: 0.9;
}

article.container {
  padding: 4.5rem 0;
  margin-bottom: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  width: 100%;

  background-color: rgba(255, 255, 255, 0.2);
}

.border-red {
  border-left: 8px solid #e76143bb;
}

.border-blue {
  border-left: 8px solid #183f66bb;
}

.border-yellow {
  border-left: 8px solid #e5a604bb;
}

main.main {
  padding: 5rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.intro {
  text-align: center;
  text-transform: uppercase;
  max-width: 640px;
  font-weight: 100;
}

.intro p {
  font-size: 0.9rem;
}

.intro p.by {
  font-size: 1.3rem;
}

#shiki .split-50-50,
#twoslash .split-50-50 {
  margin-top: 6rem;
}

.split {
  margin-top: 4rem;
  margin-bottom: 8rem;
}

.mid-10 .source {
  background-color: #bb8700;
  padding: 4px;
}

.mid-10 .output {
  background-color: black;
  color: white;
  padding: 4px;
}

.mid-10 pre {
  margin-top: 0;
}

.show-lots-of-code {
  display: flex;
  flex-wrap: wrap;
}

.show-lots-of-code pre:nth-child(even) {
  margin-left: 20px;
}

.has-funny-opening-letter {
  margin-top: 180px;
}

.show-lots-of-code > pre {
  margin-bottom: 0;
  flex: 1;
}

.code-split > div {
  max-width: 50%;
}

.lib {
  margin-bottom: 4rem;
}
.lib-content {
  display: flex;
  word-break: break-all;
  margin-top: 2rem;
}

.lib-content.right {
  flex-direction: row-reverse;
}

.lib h4 {
  font-size: 1.5rem;
  margin-top: 0.3rem;
  margin-bottom: 0.75rem;
}

.lib img {
  width: 100%;
}

.lib-content img {
  max-width: 150px;
  max-height: 150px;
  margin-right: 18px;
  margin-bottom: 18px;
}

.lib-content.right img {
  margin-right: 0;
  margin-left: 18px;
}

.lib > a,
a.lib {
  display: block;
  background-color: black;
  color: #fcf3d9;
  text-align: center;
  font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace;
  font-size: 1.3rem;
  line-height: 2.5rem;
  min-height: 2.5rem;
}

.lib > a:hover,
a.lib:hover {
  background-color: #183f66;
}

.small-only {
  display: none;
}

@media (max-width: 800px) {
  h1 {
    font-size: 2rem;
  }

  .intro p {
    font-size: 0.8rem;
  }

  img.old {
    width: 60%;
    margin-top: -20px;
    margin-bottom: 40px;
  }

  h2 {
    font-size: 2rem;
    text-align: center;
  }

  .small-only {
    display: inline-block;
  }

  .show-lots-of-code pre:nth-child(even) {
    margin-left: 0;
  }
}

/* ------------- grid ----------------- */

.split-50-50 {
  display: flex;
}

.split-50-50 div {
  flex: 1;
}

@media (max-width: 800px) {
  img {
    max-width: 100%;
  }
  .split-50-50,
  .mid-10 {
    flex-direction: column;
  }
  .left-margin-1 {
    margin-left: 1rem;
    padding: 0 !important;
    margin-right: 1rem;
  }
  .center-small {
    text-align: center;
  }

  .mid-6 {
    padding: 10px;
  }

  .code-split > div {
    max-width: none;
  }
}

.left-margin-1 {
  padding-left: 10%;
}

.mid-6 {
  max-width: 480px;
  width: 100%;
  margin-bottom: 50px;
}
.mid-8 {
  max-width: 630px;
  width: 100%;
}

.mid-10 {
  max-width: 790px;
  width: 100%;
  display: flex;
}

.mid-10 > div {
  flex: 1;
}

pre.shiki {
  margin-bottom: 20px;
}






.language-id {
  display: none;
}

.nav {
  display: flex;
  flex-direction: row;
  background-color:#FAEDC8;
  padding: 8px 20px ;
  
  &.home .subtitle {
    line-height: 22px;
  }

  .subtitle {
    font-size: 14px;
    width: 120px;
    text-align: left;
    line-height: 14px;
    margin: 0;
    margin-top: 6px;
    margin-left: 18px;
  }

  h1 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    flex-grow: 999;
    margin: 0;
    margin-top: 12px;
    font-size: 30px;
  }
}


.play {

  .play-split {
    display: flex;
    flex-direction: row;
    margin-top: 1rem;
    padding: 20px;
    height: calc(100vh - 80px);

    h3.title {
      margin-top: 0;
      text-align: center;
    }
  
    > .left,
    > .right {
      width: 50%;
      height: 100%;
      flex:1;
    }
    }

  input.codefence {
    background-color: #F5EDD6;
    font-family: monospace;
    border: none;
  }

  #output {
    .twoslash-exception-message h3 {
      font-size: 1.1rem;
    }

    .twoslash-exception-message p {
      font-size: 1rem;
    }

    .twoslash-exception-message > code {
      font-size: 0.9rem;
    }

    .twoslash-exception-code {
      display: none;
    }
  }


  .vertical-split {
    width: 2px;
    background-color: #faedc8;
    margin-left: 20px;
    margin-right: 20px;
  }

  .docs {
    border-top: 2px solid #E5A604;
    position: fixed;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: #fcf3d9;
    background: linear-gradient(to right, #FAEDC8 200px, #fcf3d9 0);

    box-shadow: 0px -1px 6px rgba(0, 0, 0, 0.11);

    
    
    .react-tabs__tab-list, .react-tabs__tab-panel, .docs-content, .react-tabs {
      height: 100%;
    }
    
    .docs-content {
      overflow-y: auto;
      background-image: url("data:image/svg+xml,%3Csvg width='19' height='7' viewBox='0 0 19 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cline y1='6.5' x2='19' y2='6.5' stroke='%23E5A604' stroke-opacity='0.8'/%3E %3Cline y1='3.5' x2='19' y2='3.5' stroke='%23E5A604' stroke-opacity='0.8'/%3E %3Crect width='19' height='1' fill='%23FCF5DE'/%3E %3C/svg%3E ");      
      background-position: center top;
      background-repeat: no-repeat;

    }

    .react-tabs {
      display: flex;
      flex-direction: row;
    
      
      .react-tabs__tab-list {
        display: flex;
        flex-direction: column;
        width: 200px;
        min-width: 200px;
        border-bottom: none;
        height: 100%;;
      }
      
      .react-tabs__tab {
        display: block;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        padding-left: 20px;
        border: none;
      }

      // titles
      .react-tabs__tab.react-tabs__tab--disabled {
        font-family: "caslon", "Times New Roman", Times, serif;
        color: black;
        padding-left: 10px;
      }
      .react-tabs__tab.react-tabs__tab--disabled h4 {
        margin-bottom: 0;
      }

      .react-tabs__tab--selected {
        border: none;
        background-color: #FCE5A5;
        border-radius: 0;
      }

      .react-tabs__tab-panel {
        padding: 12px;
        font-size: 16px;
        h2 {
          font-size: 1.4rem;
          margin-bottom: 1rem;;
        }
        p { 
          font-size: 1rem;;
        }
        blockquote {
          color: #00000090;
          margin: 20px 8px;
          margin-top: -30px;
          p {
            margin-top: 0;
          }
        }
        .clickable-code {
          > div {
            color: #00000090;
            margin: 8px 0;
            font-size: 14px;
          }
          cursor: pointer;
          &:hover{
            background-color: #FAEDC8;
          }
        }
      }

    }
  }
}





/* ------------------------------ BORING C&P STUFF BELOW ---------------------------------- */

/* ------------- Shiki Twoslash C&P ----------------- */

pre {
  /* Give the text some space to breathe */
  padding: 12px;
  line-height: 18px;
  /* All code samples get a grey border, twoslash ones get a different color */
  border-left: 1px solid #bb8700;
  border-bottom: 1px solid #bb8700;
  margin-bottom: 3rem;
  /* Important to allow the code to move horizontally;
 */
  overflow-x: auto;
  /* So that folks know you can highlight */
  position: relative;
}
pre.shiki {
  overflow-x: initial;
}
pre.shiki:hover .dim {
  opacity: 1;
}
pre.shiki div.dim {
  opacity: 0.3;
}
pre.shiki div.dim,
pre.shiki div.highlight {
  margin: 0;
  padding: 0;
}
pre.shiki div.highlight {
  opacity: 1;
  background-color: #fefff1;
}
pre.shiki div.line {
  min-height: 1rem;
}
pre.twoslash {
  border-color: black;
}
pre .code-container {
  overflow: auto;
}
pre .code-container > a {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 4px;
  border: 1px solid #719af4;
  padding: 0 8px;
  color: #719af4;
  text-decoration: none;
  opacity: 0;
  transition-timing-function: ease;
  transition: opacity 0.3s;
}
@media (prefers-reduced-motion: reduce) {
  pre .code-container > a {
    transition: none;
  }
}
pre .code-container > a:hover {
  color: white;
  background-color: #719af4;
}
pre .code-container:hover a {
  opacity: 1;
}
pre code {
  /** Style setup */
  font-size: 15px;
  font-family: var(--code-font);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
pre code a {
  text-decoration: none;
}
pre data-err {
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")
    repeat-x bottom left;
  padding-bottom: 3px;
}
pre .query {
  margin-bottom: 10px;
  color: #137998;
  display: inline-block;
}
pre .error,
pre .error-behind {
  margin-left: -14px;
  margin-top: 8px;
  margin-bottom: 4px;
  padding: 6px;
  padding-left: 14px;
  width: calc(100% - 19px);
  white-space: pre-wrap;
  display: block;
}
pre .error {
  position: absolute;
  background-color: #fee;
  border-left: 2px solid #bf1818;
  /* Give the space to the error code */
  display: flex;
  align-items: center;
  color: black;
}
pre .error .code {
  display: none;
}
pre .error-behind {
  user-select: none;
  color: #fee;
}
pre .arrow {
  /* Transparent background */
  background-color: #fcf3d9;
  position: relative;
  top: -7px;
  margin-left: 0.1rem;
  /* Edges */
  border-left: 1px solid black;
  border-top: 1px solid black;
  transform: translateY(25%) rotate(45deg);
  /* Size */
  height: 8px;
  width: 8px;
}
pre .popover {
  margin-bottom: 10px;
  border: 1px solid black;

  display: inline-block;
  padding: 0 0.5rem 0.3rem;
  margin-top: 10px;
  border-radius: 3px;
}
pre .inline-completions ul.dropdown {
  display: inline-block;
  position: absolute;
  width: 240px;
  background-color: #fffaed;
  color: black;
  padding-top: 4px;
  font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace;
  font-size: 0.8rem;
  margin: 0;
  padding: 0;
  border-left: 4px solid #183f66;
}
pre .inline-completions ul.dropdown::before {
  background-color: #4b9edd;
  width: 2px;
  position: absolute;
  top: -1.2rem;
  left: -3px;
  content: " ";
}
pre .inline-completions ul.dropdown li {
  overflow-x: hidden;
  padding-left: 4px;
  margin-bottom: 4px;
  color: #e5a604bb;
}
pre .inline-completions ul.dropdown li.deprecated {
  text-decoration: line-through;
}
pre .inline-completions ul.dropdown li span.result-found {
  color: #183f66;
}
pre .inline-completions ul.dropdown li span.result {
  width: 100px;

  display: inline-block;
}
.dark-theme .markdown pre {
  background-color: #d8d8d8;
  border-color: #ddd;
  filter: invert(98%) hue-rotate(180deg);
}
.twoslash data-lsp {
  /* Ensures there's no 1px jump when the hover happens above */
  border-bottom: 1px dotted transparent;
  /* Fades in unobtrusively */
  transition-timing-function: ease;
  transition: border-color 0.3s;
}
/* Respect people's wishes to not have animations anywhere */
@media (prefers-reduced-motion: reduce) {
  data-lsp {
    transition: none;
  }
}
/** When you mouse over the pre, show the underlines */
pre:hover data-lsp {
  border-color: #747474;
}

.tag-container {
  position: relative;

  .twoslash-annotation {
    position: absolute;
    font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New,
      monospace;
      p {
        text-align: left;
        font-size: 0.8rem;
        line-height: 0.9rem;;
      }

    
    right: -10px;
    /** Default annotation text to 200px */
    width: 200px;
    color: #187abf;
    background-color: #fcf3d9bb;


    svg {
      float: left;
      margin-left: -44px;
    }

    &.left {
      right: auto;
      left: -200px;

      svg {
        float: right;
        margin-right: -5px;
      }
    }
  }
}

pre .logger {
  // position: absolute;
  display: flex;
  align-items: center;
  color: black;
  padding: 6px;
  padding-left: 8px;
  width: calc(100% - 19px);
  white-space: pre-wrap;

  svg {
    margin-right: 9px;
  }

  &.error-log {
    background-color: #fee;
    border-left: 2px solid #bf1818;  
  }
  &.warn-log {
    background-color: rgb(255, 255, 238);
    border-left: 2px solid #eae662;  
  }
  &.log-log {
    background-color: rgb(233, 233, 233);
    border-left: 2px solid #ababab;  
    svg {
      margin-left: 6px;
      margin-right: 9px;
    }
  }
}

.twoslash data-lsp:hover::before {
  content: attr(lsp);
  position: absolute;
  transform: translate(0, 1rem);

  background-color: #3f3f3f;
  color: #fff;
  text-align: left;
  padding: 5px 8px;
  border-radius: 2px;
  font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  z-index: 100;
}

#loader {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding-top: 200px;
  padding-bottom: 200px;
  height: 400px;

  p {
    text-align: center;
  }

  .lds-grid {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    div {
      position: absolute;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #E23D1E;
      animation: lds-grid 1.2s linear infinite;

      &:nth-child(1) {
        top: 8px;
        left: 8px;
        animation-delay: 0s;
      }
      &:nth-child(2) {
        top: 8px;
        left: 32px;
        animation-delay: -0.4s;
      }
      &:nth-child(3) {
        top: 8px;
        left: 56px;
        animation-delay: -0.8s;
      }
      &:nth-child(4) {
        top: 32px;
        left: 8px;
        animation-delay: -0.4s;
      }
      &:nth-child(5) {
        top: 32px;
        left: 32px;
        animation-delay: -0.8s;
      }
      &:nth-child(6) {
        top: 32px;
        left: 56px;
        animation-delay: -1.2s;
      }
      &:nth-child(7) {
        top: 56px;
        left: 8px;
        animation-delay: -0.8s;
      }
      &:nth-child(8) {
        top: 56px;
        left: 32px;
        animation-delay: -1.2s;
      }
      &:nth-child(9) {
        top: 56px;
        left: 56px;
        animation-delay: -1.6s;
      }
    }
  }
}

@keyframes lds-grid {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
